package com.qaplus.service;

import java.util.List;

import javax.servlet.http.HttpServletResponse;

import com.qaplus.entity.QaUser;
import com.qaplus.entity.vo.ClassStuZTreeVo;
import com.qaplus.entity.vo.Page;
import com.qaplus.entity.vo.ResponseData;

public interface UserService {
	void previewImg(HttpServletResponse response);
	
	QaUser userLogin(String username, String password);

	// 查询某个学生的老师
	QaUser queryTeacher(Long id);

	QaUser userRegister(QaUser user);

	// 获得用户数组
	ResponseData<QaUser> getUserList(Page page, QaUser user);

	List<QaUser> selectAllTeacher();

	int updateByPrimaryKeySelective(QaUser record);
	
	QaUser queryById(Long id);
	
	QaUser queryIsDeletedUserByUsername(String username);
	
	int updateIsDeletedUserCanUser(Long id);
	
	//找到老师所有的学生
	List<QaUser> selectAllStusByTeacherId(Long teacherId);
	
	//查询一个班级的所有学生
	List<QaUser> selectAllStusByClassId(Long classId);
	
	//查询班级下的所有用户，包括老师
	List<QaUser> selectAllUserByClassId(Long classId);
	
	//老师带的所有班级学生  树形结构展示
	List<ClassStuZTreeVo> buildClassStuZTree();
	
	QaUser getCurrentUserBySession();
	
	QaUser checkUsername(String username);
	
	QaUser updateUserInfo(QaUser user);

	List<ClassStuZTreeVo> buildAllUserTree();
	
	//没有交家庭作业都人
	List<QaUser> queryUncommitHomeworkUser(Long homeworkId);
	
	List<QaUser> queryCommitHomeworkUser(Long homeworkId);
	
	// 总共布置给了多少人
	List<QaUser> queryHomeworkUsers(Long homeworkId);

}
